package pl.enigmatic.parser.xml.pl.edu.enigma.math.graph;

import pl.enigmatic.math.graph.SelfBasedTree;
import pl.enigmatic.math.graph.Tree;
import pl.enigmatic.parser.xml.CollectionPropertyExtension;
import pl.enigmatic.parser.xml.Parser;


@SuppressWarnings("rawtypes")
public class SelfBasedTreeParser extends Parser<SelfBasedTree> {

	public static final String CHILDREN = "children";
	public static final String ADD_CHILD = "addChild";

	public SelfBasedTreeParser() {
		super(SelfBasedTree.class, true);
	}

	@Override
	protected void addCustomModules() {
		addExtension(CollectionPropertyExtension.createCustom(this, CHILDREN, ADD_CHILD, Tree.class));
	}

	@Override
	protected String initContent() {
		return CHILDREN;
	}
}
